﻿using SmallJob.Model;
using SmallShop.Services.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmallJob.Services.Code
{
    public class LogHelper
    {
        public static void SmsLog(ISmsLogService service, Helpers.SmsHelpers.SmsResultObject result, string smsresult, int receiverid, int orderid, string content)
        {
            var log = new SmsLog()
            {
                DateCreated = DateTime.Now,
                MessageID = result.message_id,
                SmsResult = smsresult,
                Status = result.status,
                UserID = receiverid,
                OrderID = orderid,
                SmsContent = content
            };
            service.Add(log);
        }
    }
}
